22 #define foreach(x, v) for (typeof (v).begin() x = (v).begin(); x != (v).end(); ++x)
23 #define For(i, a, b) for (int i=(a); i<(b); ++i)
24 #define D(x) cout << #x " is " << x << endl
29 for (int i
=2; i
*i
<=n
; ++i
) if (n
% i
== 0) return false;
34 while (fgets(buf
, 32, stdin
) != NULL
){
36 for (int i
=0; i
<strlen(buf
)-1; ++i
){
38 n
+= (islower(c
) ? c
- 'a' + 1 : c
- 'A' + 27);
40 printf("It is %sa prime word.\n", p(n
) ? "" : "not ");